function div(nums,target){
    let n =nums.length;
    let l =0,r = n-1;
    while(l <= r){
        let m = ~~((l+r)>>1);
        if(nums[m] > target){
            r=m-1;
        }else if(nums[m] <target){
            l =m+1;
        }else{
            return m;
        }
    }
    return l;
}